Read me for: “Scraping public co-occurrences for statistical network analysis of political elites”

This replication directory contains file to replicate all analyses in the main text and appendix of the paper. 

The files are divided into three groups: data files, miscellaneous files, and R code to reproduce results and figures.

NOTE: replication of ERGM-count results will not perfectly match Appendix Table 3, columns 3 and 6. 
This is due to not fixing the seed for the model when first generating these results. 
This problem has now been addressed, so the code will always produce the same exact results thereafter.

NOTE: All code was run using RStudio Version 1.0.136 on R version 3.2.4 (2016-03-10) -- "Very Secure Dishes”, 
Platform: x86_64-apple-darwin13.4.0 (64-bit)

NOTE: Replication logs for each code file are provided as: 
“nigeria-replication.log”
“northkorea-replication.log”
“senatepress-replication.log”
“network-centrality-replication.log”



# Data files (22):

110housefull.csv: List of representatives in 110th House from Victor & Ringe (2009).
apira.csv: Network centrality data for Mexico board members from Avina-Vazquez & Uddin (2013).
caucus.csv: Scraped House caucus network data (edgelist output).
cosponsorships.csv: Scraped Senate cosponsorship network data (edgelist output).
Desmarais-names.csv: List of senators in 110th U.S. Senate from Desmarais et al (2015).
fowler108full.csv: Network centrality data for Senate cosponsorships from Fowler (2006).
full435.csv: Full possible pairs list of representatives in 110th House.
ishiyama2014-kju2012.csv: North Korea elite network replication data from Ishiyama (2014).
mexico24.csv: List of Mexico board members from Avina-Vazques & Uddin (2013)
mexicoboard.csv: Scraped Mexico board network (edgelist output).
netList.RData: Senate Press Event replication data from Desmarais et al (2015).
nigeria2012.csv: Scraped Nigerian oil elite 2012 network data (raw output).
nigeria2015.csv: Scraped Nigerian oil elite 2012 network data (raw output).
nigerialist2012.csv: List of Nigerian oil elites in 2012.
nigerialist2015.csv: List of Nigerian oil elites in 2015.
northkorea2012.csv: Scraped North Korean elite 2012 network data (raw output).
senatepress1.csv: Scraped Senate Press events network data with keyword set 1 (raw output).
senatepress2.csv: Scraped Senate Press events network data with keyword set 1 (raw output).
senatepress3.csv: Scraped Senate Press events network data with keyword set 1 (raw output).
senatepress4.csv: Scraped Senate Press events network data with keyword set 1 (raw output).
senatepress5.csv: Scraped Senate Press events network data with keyword set 1 (raw output).
victorringe.csv: Network centrality data for 110th House from Victor & Ringe (2009).


# Miscellaneous files (2);

leftplotcoord.csv: matrix of network graph coordinates for Nigerian oil network plot for 2012 (Figure 1, left panel).
rightplotcoord.csv: matrix of network graph coordinates for Nigerian oil network plot for 2015 (Figure 1, right panel).


# Code files (4) to be run in the following order:

nigeria-replication.R: Replication code for generating Figure 1, Appendix Table 2, Appendix Table 3.
northkorea-replication.R: Replication code for generating: Appendix Figure 1, Appendix Figure 2, and statistical summaries reported within text on Appendix page 1.
senatepress-replication.R: Replication code for generating: Appendix Figure 3, Appendix Table 1.
network-centrality-replication.R: Replication code for generating: Appendix Figure 4.



